/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.SpectralLibraryMatch;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * SpectralLibraryMatchSummary
 */
@JsonPropertyOrder({
  SpectralLibraryMatchSummary.JSON_PROPERTY_BEST_MATCH,
  SpectralLibraryMatchSummary.JSON_PROPERTY_SPECTRAL_MATCH_COUNT,
  SpectralLibraryMatchSummary.JSON_PROPERTY_REFERENCE_SPECTRA_COUNT,
  SpectralLibraryMatchSummary.JSON_PROPERTY_DATABASE_COMPOUND_COUNT
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class SpectralLibraryMatchSummary {
  public static final String JSON_PROPERTY_BEST_MATCH = "bestMatch";
  @jakarta.annotation.Nullable
  private SpectralLibraryMatch bestMatch;

  public static final String JSON_PROPERTY_SPECTRAL_MATCH_COUNT = "spectralMatchCount";
  @jakarta.annotation.Nonnull
  private Long spectralMatchCount;

  public static final String JSON_PROPERTY_REFERENCE_SPECTRA_COUNT = "referenceSpectraCount";
  @jakarta.annotation.Nonnull
  private Integer referenceSpectraCount;

  public static final String JSON_PROPERTY_DATABASE_COMPOUND_COUNT = "databaseCompoundCount";
  @jakarta.annotation.Nonnull
  private Integer databaseCompoundCount;

  public SpectralLibraryMatchSummary() {
  }

  public SpectralLibraryMatchSummary bestMatch(@jakarta.annotation.Nullable SpectralLibraryMatch bestMatch) {
    
    this.bestMatch = bestMatch;
    return this;
  }

  /**
   * Get bestMatch
   * @return bestMatch
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_BEST_MATCH)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public SpectralLibraryMatch getBestMatch() {
    return bestMatch;
  }


  @JsonProperty(JSON_PROPERTY_BEST_MATCH)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setBestMatch(@jakarta.annotation.Nullable SpectralLibraryMatch bestMatch) {
    this.bestMatch = bestMatch;
  }

  public SpectralLibraryMatchSummary spectralMatchCount(@jakarta.annotation.Nonnull Long spectralMatchCount) {
    
    this.spectralMatchCount = spectralMatchCount;
    return this;
  }

  /**
   * Get spectralMatchCount
   * @return spectralMatchCount
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_SPECTRAL_MATCH_COUNT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Long getSpectralMatchCount() {
    return spectralMatchCount;
  }


  @JsonProperty(JSON_PROPERTY_SPECTRAL_MATCH_COUNT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setSpectralMatchCount(@jakarta.annotation.Nonnull Long spectralMatchCount) {
    this.spectralMatchCount = spectralMatchCount;
  }

  public SpectralLibraryMatchSummary referenceSpectraCount(@jakarta.annotation.Nonnull Integer referenceSpectraCount) {
    
    this.referenceSpectraCount = referenceSpectraCount;
    return this;
  }

  /**
   * Get referenceSpectraCount
   * @return referenceSpectraCount
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_REFERENCE_SPECTRA_COUNT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Integer getReferenceSpectraCount() {
    return referenceSpectraCount;
  }


  @JsonProperty(JSON_PROPERTY_REFERENCE_SPECTRA_COUNT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setReferenceSpectraCount(@jakarta.annotation.Nonnull Integer referenceSpectraCount) {
    this.referenceSpectraCount = referenceSpectraCount;
  }

  public SpectralLibraryMatchSummary databaseCompoundCount(@jakarta.annotation.Nonnull Integer databaseCompoundCount) {
    
    this.databaseCompoundCount = databaseCompoundCount;
    return this;
  }

  /**
   * Get databaseCompoundCount
   * @return databaseCompoundCount
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_DATABASE_COMPOUND_COUNT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Integer getDatabaseCompoundCount() {
    return databaseCompoundCount;
  }


  @JsonProperty(JSON_PROPERTY_DATABASE_COMPOUND_COUNT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setDatabaseCompoundCount(@jakarta.annotation.Nonnull Integer databaseCompoundCount) {
    this.databaseCompoundCount = databaseCompoundCount;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SpectralLibraryMatchSummary spectralLibraryMatchSummary = (SpectralLibraryMatchSummary) o;
    return Objects.equals(this.bestMatch, spectralLibraryMatchSummary.bestMatch) &&
        Objects.equals(this.spectralMatchCount, spectralLibraryMatchSummary.spectralMatchCount) &&
        Objects.equals(this.referenceSpectraCount, spectralLibraryMatchSummary.referenceSpectraCount) &&
        Objects.equals(this.databaseCompoundCount, spectralLibraryMatchSummary.databaseCompoundCount);
  }

  @Override
  public int hashCode() {
    return Objects.hash(bestMatch, spectralMatchCount, referenceSpectraCount, databaseCompoundCount);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SpectralLibraryMatchSummary {\n");
    sb.append("    bestMatch: ").append(toIndentedString(bestMatch)).append("\n");
    sb.append("    spectralMatchCount: ").append(toIndentedString(spectralMatchCount)).append("\n");
    sb.append("    referenceSpectraCount: ").append(toIndentedString(referenceSpectraCount)).append("\n");
    sb.append("    databaseCompoundCount: ").append(toIndentedString(databaseCompoundCount)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

